from appium.webdriver.common.appiumby import AppiumBy

from base.wework_app import WorkPage



class AddPage(WorkPage):
    _m_input = AppiumBy.XPATH, '//android.widget.TextView[@text="手动输入添加"]'

    def m_input(self):
        # 点击手动输入
        self.find_ele_click(self._m_input)
        from page.Manual_input_page import ManualPage
        return ManualPage(self.driver)

    def add_success(self):
        self.screen()
        self.source()
        # 添加成功
        res1 = self.driver.find_element(AppiumBy.XPATH, '//*[@class="android.widget.Toast"]')
        return res1
